local joy__taoxian = fk.CreateSkill {

  name = "joy__taoxian",

  tags = {  },

}



joy__taoxian:addEffect("viewas", {
  name = "joy__taoxian",
  anim_type = "support",
  pattern = "peach",
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).suit == Card.Heart
  end,
  view_as = function(self, player,cards)
    if #cards ~= 1 then return nil end
    local c = Fk:cloneCard("peach")
    c.skillName = joy__taoxian.name
    c:addSubcard(cards[1])
    return c
  end,
})

joy__taoxian:addEffect(fk.CardUsing, {
  name = "#joy__taoxian_trigger",
  --joy__taoxian,
  events = {fk.CardUsing},
  can_trigger = function(self, event, target, player, data)
    return target ~= player and player:hasSkill(joy__taoxian.name) and data.card.name == "peach"
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, "joy__taoxian")
  end,
})

return joy__taoxian